package com.yami.shop.bean.model;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "用户备注信息表")
@TableName("tz_melt_cloud_user_remark")
@Builder
public class MeltCloudUserRemark {
    
    @Schema(description = "备注id")
    @TableId(type = IdType.AUTO)
    private String id;

    @Schema(description = "原用户id")
    @TableField(value = "user_id")
    private String userId;

    @NotNull(message = "备注类型不能为空")
    @Schema(description = "被备注类型 1:用户 2：群聊")
    @TableField(value = "type")
    private Integer type;

    @NotEmpty(message = "用户或群id不能为空")
    @Schema(description = "被备注对象id，用户id/群id")
    @TableField(value = "obj_id")
    private String objId;

    @Schema(description = "备注名称")
    @TableField(value = "remark", insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
    private String remark;

    @Schema(description = "创建时间")
    private Date createTime;
    
}
